package com.spsy.controller;

import com.spsy.asyncqueue.Createqueue;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/user")
public class Coller {
    @Autowired
    Createqueue createqueue;

    @PostMapping("/queue")
    public void Queuesss(String s){
        createqueue.sendNotification(s);
        System.out.println("异步线程调用成功");
    }

    @PostMapping("/execution")
    public void testExecution(){
        createqueue.testExecotion();
    }
}
